Skip to content

docs(agent-device): say what the local profile needs when the worker listens on one network address - #1936

Open
thymikee wants to merge 2 commits into
mainfrom
fix/agent-device-profile-loopback
Open

thymikee wants to merge 2 commits into
mainfrom
fix/agent-device-profile-loopback

Conversation

@thymikee

@thymikee thymikee commented Nov 28, 2026 •

Copy link
Copy Markdown
Member

Summary

agent-device is adopting a credential transport rule (its ADR 0041, for 0.22): a token goes only over https or loopback http. Later 0.21 releases will warn about anything else and 0.22 will refuse it; AGENT_DEVICE_ALLOW_INSECURE_TRANSPORT=1 overrides it. Neither has shipped yet.

The same-Mac profile already uses loopback for a loopback or wildcard http.host. With one network address, HTTP listens only there, so a loopback URL would not reach it.

Choice: keep that address and document the two ways out. A second loopback listener would add a bind that can fail, open a socket the operator did not configure, and change ADR 0046 §2.

No behaviour change: user docs, one why: comment and a test for the kept address.

Validation

  • Socket probe, macOS 27.0: bound to one network IPv4, 127.0.0.1 and ::1 refuse. Bound to :: or 0.0.0.0, 127.0.0.1 connects.
  • vitest run --project unit src/agent-device/local-profile.test.ts: 7 passed. The new test fails when profileOrigin maps every IPv4 address to loopback.
  • Not run: website build, a real agent-device client. The warning and refusal were not yet in agent-device main or its 0.22 branch.
  • CI: pending.

Review

Spec review: skipped. Code review: 0 blocking, 0 fixed, 0 notes. Claims review: 2 blocking, 2 fixed, 0 notes.
Rounds: 2. Tokens: n/a.
One Sonnet 5.5 reviewer ran both reviews after seeing the PR body; no Opus code review ran.

Assessment: complete

🤖 Generated with Claude Code

Written by an agent.

…listens on one network address

agent-device 0.22 refuses to send a token over plain http off loopback, and
0.21.x warns. The profile already uses loopback wherever the listener is sure
to answer there; a worker bound to one network address answers nowhere else,
so the profile keeps naming it and the docs say what to do.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 28, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

A new test checks that a local profile uses the configured non-wildcard HTTP address. A comment clarifies how wildcard and non-wildcard hosts map to the profile origin. The documentation describes agent-device’s plain-HTTP behavior and two configuration options.

Suggested reviewers: v3ron

Merge Risk: Minimal · up to 45f8b

This change adds a test, a code comment, and documentation, and does not alter runtime behavior. It is low risk to merge.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the docs change and the local profile behavior for a worker listening on one network address. The changeset adds docs for that case, a why: comment in host.ts, and a test that keeps th…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description check Passed The description is related to the changeset. It explains the agent-device credential transport rule (ADR 0041), why the same-Mac profile keeps a single non-wildcard network address instead of mapping …
Full details: Title check

Explanation

The title names the docs change and the local profile behavior for a worker listening on one network address. The changeset adds docs for that case, a why: comment in host.ts, and a test that keeps the network address in daemonBaseUrl. The title is specific and matches the main change.

Full details: Description check

Explanation

The description is related to the changeset. It explains the agent-device credential transport rule (ADR 0041), why the same-Mac profile keeps a single non-wildcard network address instead of mapping it to loopback, and the two documented options. It also covers the test added for the kept address, the documentation changes, and validation steps such as the socket probe and the vitest run with 7 passing tests. It is detailed and specific to the changes listed in the summary, so it passes.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: QUIET
  • Plan: Advanced
  • Run ID: e20085e7-eb8d-4a1a-878b-6a895e1969dc
Commits

Reviewing files that changed from the base of the PR and between e9d2324 and 45f8b9e.

Files selected for processing: 2

  • src/modules/host.ts
  • website/src/content/docs/docs/using-devices/agent-device.mdx

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 2 remain after this review.

The page stated them as current behaviour, and no released agent-device has
either yet. The why: comment on the profile address no longer says only a
wildcard bind answers on loopback.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant